<?php


class m_V extends M {


	public $zhaopin = array(
		
		//"title" => "EmailAddress",
		"title" => array("v"=>"NotEmpty", "m"=>"职位名称不能为空！！！认真填写"),
		//"renshu" => array("v" => "NotEmpty", "m" => "");
		"hangye" => array("v"=>"Digits", "m"=>"行业选项不能为空！！！认真填写"),
		"diqu" => array("v"=>"Digits", "m"=>"地区选项不能为空！！！认真填写"),
		"xueli" => array("v"=>"Digits", "m"=>"学历选项不能为空！！！认真填写"),
		"jingyan" => array("v"=>"Digits", "m"=>"工作经验选项不能为空！！！认真填写"),
		"xinzi" => array("v"=>"Digits", "m"=>"薪资选项不能为空！！！认真填写"),
		
	);
	
	public $qiye = array (
		"name" => array("v" => "NotEmpty", "m" => "企业名不能为空"),
	);
	
	public $r;



	function __init__ () {
	
		require_once 'Zend/Validate.php';
	
	}
	
	function zhaopin($data) {
		foreach($this->zhaopin as $key=>$value) {
			if (!Zend_Validate::is($data[$key], $value["v"])) {
				$this->r[]=$value["m"];
				
			}
		}
		
		
		if(!empty($this->r)) {
			
			
			foreach($this->r as $key) {
			
				echo "<h3 style='color:red';>".$key."</h3>";
			}
			
			
			exit("出错了，请看上面的提示，认真填写数据");
			
			
		}
	
	}
	
	function qiye($data) {
		foreach($this->qiye as $key=>$value) {
		
			if (!Zend_Validate::is($data[$key], $value["v"])) {
				$this->r[]=$value["m"];
				
			}
		}
		
		
		if(!empty($this->r)) {
			
			
			foreach($this->r as $key) {
			
				echo "<h3 style='color:red';>".$key."</h3>";
			}
			
			
			exit("出错了，请看上面的提示，认真填写数据");
			
			
		}
	
	}












}